package com.imooc.singleton;

//单例-饿汉式
public class SingletonOne {
	//1.创建类中私有构造方法
	private SingletonOne() {
		
	}
	
	//2.创建该类的私有静态实例
	private static SingletonOne instance = new SingletonOne();
	
	//3.对外提供静态共有方法,返回静态实例对象
	public static SingletonOne getInstance() {
		return instance;
	}
}
